﻿@model System.Web.HttpContextBase
@{
    ViewBag.Title = "上传盘点数据文件";
    var _inventID =  (int)ViewData["inventoryID"];
}

<div style="padding: 5px 10px;">
    <span  class="btn_green" >上传盘点数据文件</span>
</div>

<div style="padding: 0px 10px; margin-top:10px; margin-bottom:20px;">
    <table class="tb" width="98%" style="text-align: center;">
    @*new { enctype = "multipart/form-data" }比不可少，否则上传文件不会成功 *@
    @using (Html.BeginForm("InventUpload", "Inventory", FormMethod.Post, new { enctype = "multipart/form-data", inventID = _inventID }))
    {
        <tr>
            <td><text>选择上传盘点数据文件：</text><input name="file" type="file" id="file" style="width:80%" /></td>
         
            <td><input name="inventID" id="inventID" type="hidden" value="@_inventID" />
                <input type="submit" name="上传" value="上传" class="btn_green" onclick="return uploadCheck()" />
             </td>
        </tr>
    }
     </table>
</div>
 
<a href="@Url.Action("InputInventIDs", "Inventory", new { id = _inventID, inventIds = "" })" class="btn_green">直接输入盘点数据</a>

    <script type="text/javascript">
        function uploadCheck() {
            alert(("#file :input").text());
            return false;
        }
    </script>